package com.licode.codekit.db;

import com.licode.codekit.buildprj.ProjectContext;

/**
 * @author licode
 */
public class GenerateCtx {
    private String dir;
    private int tablePrefix;
    private String suffix;

    private String entityName;
    private String entityField;
    private String author = "licode";

    private boolean entityMode = false;

    /**
     * JDK版本
     */
    private int jdkVersion = 8;

    /**
     * 是否是2.x版本的springBoot
     */
    private boolean isSpringBoot2x = true;

    public GenerateCtx() {

    }

    public boolean isPO() {
        return "PO".endsWith(suffix);
    }

    public GenerateCtx(String dir, String suffix) {
        this.dir = dir;
        this.suffix = suffix;
        this.tablePrefix = 0;
    }

    public boolean getEntityMode() {
        return this.entityMode;
    }

    public void setEntityMode(boolean val) {
        this.entityMode = val;
    }

    public int getJdkVersion() {
        return jdkVersion;
    }

    public void setJdkVersion(int jdkVersion) {
        this.jdkVersion = jdkVersion;
    }

    public boolean isSpringBoot2x() {
        return isSpringBoot2x;
    }

    public void setSpringBoot2x(boolean springBoot2x) {
        isSpringBoot2x = springBoot2x;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getEntityName() {
        return entityName;
    }

    public void setEntityName(String entityName) {
        this.entityName = entityName;
    }

    public String getEntityField() {
        return entityField;
    }

    public void setEntityField(String entityField) {
        this.entityField = entityField;
    }

    public String getDir() {
        return dir;
    }

    public void setDir(String dir) {
        this.dir = dir;
    }

    public String getSuffix() {
        return suffix;
    }

    public int getTablePrefix() {
        return tablePrefix;
    }

    public void setTablePrefix(int tablePrefix) {
        this.tablePrefix = tablePrefix;
    }
}
